Northwind Test with Yukon

Order Details Extended View

Owner

dbo

Creation Date

10-07-2003 10:31:36

Remarks


Columns

NameTypeLengthIsNullableCollation
OrderIDint4 
ProductIDint4 
ProductNamenvarchar80SQL_Latin1_General_CP1_CI_AS 
ProductNamesysname80SQL_Latin1_General_CP1_CI_AS 
UnitPricemoney8 
Quantitysmallint2 
Discountreal4 
ExtendedPricemoney8 

View Definition

create view "Order Details Extended" AS
SELECT "Order Details".OrderID, "Order Details".ProductID, Products.ProductName, 
	"Order Details".UnitPrice, "Order Details".Quantity, "Order Details".Discount, 
	(CONVERT(money,("Order Details".UnitPrice*Quantity*(1-Discount)/100))*100) AS ExtendedPrice
FROM Products INNER JOIN "Order Details" ON Products.ProductID = "Order Details".ProductID
--ORDER BY "Order Details".OrderID